package com.xyb.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * (Course)实体类
 *
 * @author makejava
 * @since 2021-10-20 16:49:20
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Course implements Serializable {
    public interface insert {
    }

    public interface update {
    }

    public interface status {
    }

    private static final long serialVersionUID = -95217916350293041L;
    /**
     * 课程id
     */
    private Long courseId;
    /**
     * 主题id
     */
    @NotNull(message = "专题分类不能为空", groups = {Course.insert.class, Course.update.class})
    private Long topicId;
    private String topicName;
    /**
     * 课程名称
     */
    @Length(max = 60, message = "课程名称不得超过60个字符", groups = {Course.insert.class, Course.update.class})
    @NotBlank(message = "课程名称不能为空", groups = {Course.insert.class, Course.update.class})
    private String courseName;
    /**
     * 课程封面
     */
    @NotBlank(message = "课程封面不能为空", groups = {Course.insert.class, Course.update.class})
    private String courseCover;
    /**
     * 课程图片
     */
    private String coursePic;
    /**
     * 课程社区URL
     */
    private String courseCommunityUrl;
    /**
     * 课程教师
     */
    @NotBlank(message = "教师不能为空", groups = {Course.insert.class, Course.update.class})
    private String courseTeacher;
    /**
     * qq群
     */
    @NotBlank(message = "QQ群不能为空", groups = {Course.insert.class, Course.update.class})
    private String qqGroup;
    /**
     * 课程简介
     */
    @NotBlank(message = "课程简介不能为空", groups = {Course.insert.class, Course.update.class})
    private String courseIntroduction;

    /**
     * 课程来源
     */
    private Integer courseSource;
    /**
     * 排序
     */
    private Integer showOrder;
    /**
     * 状态
     * 0弃用
     * 1在用
     * -1 零基础入门
     */
    @NotNull(message = "状态不能为空", groups = {Course.status.class})
    private Integer status;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 创建人
     */
    private String createUser;

}